package com.asion.vmovie.adapters;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.asion.vmovie.fragment.BaseRecyclerFragment;

import java.util.List;

/**
 * Created by asion on 16-10-18.
 */

public class MuHouViewAdapter extends FragmentPagerAdapter {
    private List<String> title;
    private List<String> cataId;

    public MuHouViewAdapter(FragmentManager fm, List<String> title, List<String> cataId) {
        super(fm);
        this.title = title;
        this.cataId = cataId;
    }

    @Override
    public Fragment getItem(int position) {
        return BaseRecyclerFragment.newInstance(cataId.get(position));
    }

    @Override
    public int getCount() {
        return title.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return title.get(position);
    }
}
